#ifndef Z_DOOR
#define Z_DOOR

#include "stdafx.h"

class safedoor{
public:
    inline safedoor();
    inline void setposation(int x1,int y1,int x2,int y2);
    inline void getposation(int &x1,int &y1,int &x2,int &y2) const;
    inline void Draw(CDC *pDC);
private:
    int X1,X2,Y2,Y1;
    CPen m_wall;
};

safedoor::safedoor(){
    
}

void safedoor::setposation(int x1, int y1, int x2, int y2) {
    X1=x1;
    X2=x2;
    Y1=y1;
    Y2=y2;
}

void safedoor::getposation(int &x1,int &y1,int &x2,int &y2) const{
    x1=X1;
    x2=X2;
    y1=Y1;
    y2=Y2;
}

void safedoor::Draw(CDC *pDC){
    LOGBRUSH logBrush; 
    logBrush.lbStyle = BS_SOLID; 
    logBrush.lbColor =RGB(255,0,0); 
   
    m_wall.CreatePen(PS_SOLID|PS_GEOMETRIC|PS_ENDCAP_SQUARE, 13, &logBrush);
    
    pDC->SelectObject(&m_wall);
    pDC->SetViewportOrg(0,0);
    pDC->MoveTo(X1,Y1);
    pDC->LineTo(X2,Y2);
}

#endif